package composite;


/**
 * Testing the Composite Patterm 
 */
public class CompositePatternDemo {
	
	/**
	 * Testing the composite pattern by printing out the company's list of employees
	 * @param args list of arguments when running in console 
	 */
	public static void main(String[] args){
		Employee ceo = new Employee("JOHN", "ceo", 33000, 0);
		Employee headSales = new Employee("Robert", "Head Sales", 20000);
		Employee headMarketing = new Employee("Michael", "Head Marketing", 21000);
		Employee salesExecutive1 = new Employee("Richard", "Sales", 5000);
		Employee salesExecutive2 = new Employee("Rob", "Sales", 5000);
		
		// Add
		ceo.add(headSales);
		ceo.add(headMarketing);
		headMarketing.add(salesExecutive1);
		headSales.add(salesExecutive2);
		
		System.out.println(ceo);
	
	}
}
